<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态绑定 style 三目运算符语法</title>
    <script src="../../../../../js/vue.global.js"></script>
</head>
<body>
<div id="app">
    <h1 v-bind:style="{color: isColorDecorated? 'red' : 'yellow', textDecoration:isTextDecorated?'underline':''}">Hello, World!</h1>
</div>

<script>
    const app = Vue.createApp({
        data() {
            return {
                isColorDecorated: true,
                isTextDecorated: true,
            }
        }
    })
    app.mount("#app")
</script>
</body>
</html>